<?php
/*
*   项目文章内页
*/
	$taxonomy = 'items';
	$items_detail=get_the_terms($post->ID,$taxonomy);
	$parent_detail = get_term_by('id',$items_detail[0]->parent,$taxonomy,ARRAY_A );	//获取文章分类信息
	get_header();
	if(have_posts()):the_post();
?>
	<div class="pinpaiMenu po_r swiper-container">
		<ul class="menuScroll_lists  po_a cf swiper-wrapper">
			<li class="swiper-slide"><a href="/" >首页<em></em></a></li>
			<li class="swiper-slide"><a href="<?php echo get_term_link($parent_detail['term_id'],$taxonomy);?>" ><?php echo $parent_detail['name'];?><em></em></a></li>
			<li class="swiper-slide"><a href="<?php echo get_term_link($items_detail[0]->term_id,$taxonomy);?>" ><?php echo $items_detail[0]->name;?><em></em></a></li>
			<li class="swiper-slide active"><a>正文<em></em></a></li>
		</ul>
	</div>
	<div class="content">
		<div class="title"><?php the_title();?></div>
		<?php
			if(get_field('img')){
		?>
		<section class="section-wrapper">
			<img src="<?php the_field('img');?>"/>
		</section>
		<?php
			}
			if(get_field('about')){
		?>
		<section class="section-wrapper">
		<p>　　<?php the_field('about');?></p>
		</section>
		<?php
			}
			if(get_field('syfw')){
		?>
		<section class="section-wrapper">
			<h2>适宜范围</h2>
			<p>
				<?php the_field('syfw');?>
			</p>
		</section>
		<?php
			}
			if(get_field('pays')){
		?>
		<section class="section-wrapper">
			<h2>鹏爱优势</h2>
			<p><?php the_field('pays');?></p>
		</section>
		<?php
			}
			if(get_field('comment')){
		?>
		<section class="section-wrapper">
			<h2>用户评论</h2>
			<?php
				foreach (get_field('comment') as $key => $value) {
			?>
			<h3>　　<?php echo $value['title'];?></h3>
			<p>　　<?php echo $value['content'];?></p>
			<?php
				}
			?>
		</section>
		<?php
			}
			if(get_field('case_img')){
		?>
		   <?php /*?>
		<section class="section-wrapper">
			<h2>案例局部</h2>
			<img src="<?php the_field('case_img');?>">
		</section>
		    <?php */?>
		<?php
			}
			if(get_field('syrq')){
		?>
		<!-- <section class="section-wrapper">
			<h2>适用人群</h2>
			<p><?php the_field('syrq');?></p>
		</section> -->
		<?php
			}
			if(get_field('hfsj')){
		?>
		<section class="section-wrapper">
			<h2>恢复时间</h2>
			<p><?php the_field('hfsj');?></p>
		</section>
		<?php
			}
			if(get_field('zysx')){
		?>
		<section class="section-wrapper">
			<h2>注意事项</h2>
			<p><?php the_field('zysx');?></p>
		</section>
		<?php
			}
		?>
		<nav class="context">
			<li class="prev"><?php if (get_previous_post()) { previous_post_link('上一篇：%link');} else {echo "上一篇：没有了，已经是最新文章";} ?></li>
			<li class="next"><?php if (get_next_post()) { next_post_link('下一篇：%link');} else {echo "下一篇：没有了，已经是最后文章";} ?></li>
		</nav>
	</div>
<?php
	endif;
	get_footer();
?>